package org.apache.flink.runtime.metrics.scope;

/**
 * The scope format for the {@link org.apache.flink.runtime.metrics.groups.ConsumerManagerMetricGroup}.
 */
public class ConsumerScopeFormat extends ScopeFormat {

    public ConsumerScopeFormat(String format) {
        super(format, null, new String[] {SCOPE_CONSUMER_ID, SCOPE_CONSUMER_NAME});
    }

    public String[] formatScope(String consumerId, String consumerName) {
        final String[] template = copyTemplate();
        final String[] values = {consumerId, consumerName};
        return bindVariables(template, values);
    }
}
